
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<head>
<title>Market place</title>
</head>
<body>
	<ui:composition template="/templates/masterTemplate.xhtml">

		<ui:define name="content">
			<h:outputStylesheet library="css" name="shopping.css"></h:outputStylesheet>
			<ui:remove>
				<p:notificationBar widgetVar="noticeBar" autoDisplay="true"
					effect="slide" effectSpeed="slow"
					style="width:100%;color:light-gray">
					<h:panelGrid columns="1" style="width:100%">
						<h:panelGrid columns="3" style="width:100%">
							<h:outputText value="" style="width:100%"></h:outputText>
							<h:panelGrid columns="2">
								<h:outputText id="noticeBarTitle" value="#{info.noticeBarTitle}"
									style="font-size:1.2em;color:red;float:left"></h:outputText>
								<h:commandButton value="#{msgs.close}" type="button"
									onclick="noticeBar.hide()" style="float:right"></h:commandButton>
							</h:panelGrid>
							<h:outputText value="" style="width:100%"></h:outputText>
						</h:panelGrid>
						<h:outputText value="#{info.noticeBarContent1}"
							style="font-size:1.2em;color:green"></h:outputText>
						<h:outputText value="#{info.noticeBarContent2}"
							style="font-size:1.2em;color:green"></h:outputText>
					</h:panelGrid>
					<p:effect event="load" type="pulsate" for="noticeBarTitle"
						speed="2000"></p:effect>
				</p:notificationBar>
			</ui:remove>
			<div id="center">
				<h:form id="centerForm" style="font-size:0.9em;font-weight:regular">

					<ui:remove>
						<p:panel>
							<h:panelGrid columns="5"
								style="width:100%;font-size:1.1em; font-weight:bold;">
								<p:commandLink value="#{msgs.vegetable}" ajax="true"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue"
									actionListener="#{shoppingCartModel.requiredWeek.setVegetableAsCurrentType}" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_FRUIT}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setFruitAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_TOFU}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setTofuAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_SAUCE}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setSauceAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_SEASONING}"
									ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setSeasoningAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_SPICY}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setSpicyAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_SNACK}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setSnackAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_DRIED_FOOD}"
									ajax="true" update=":centerForm:vegetableProductListDataGrid"
									actionListener="#{shoppingCartModel.requiredWeek.setDriedFoodAsCurrentType}"
									style="color:blue" />
								<p:commandLink value="#{msgs.PRODUCT_TYPE_OTHER}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setOtherAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
								<p:commandLink value="#{msgs.fastSale}" ajax="true"
									actionListener="#{shoppingCartModel.requiredWeek.setClearanceAsCurrentType}"
									update=":centerForm:vegetableProductListDataGrid"
									style="color:blue" />
							</h:panelGrid>
						</p:panel>
						<ui:include
							src="/components/public/product/vegetableShoppingProductList.xhtml" />
					</ui:remove>
					<ui:remove>
						<p:media value="../resources/music/music.mp3" width="210"
							rendered="true" height="0.1" player="quicktime">
							<f:param name="autoPlay" value="true"></f:param>
						</p:media>
					</ui:remove>
					<p:tabView id="shoppingTabView" orientation="top" dynamic="true"
						cache="false">
						<p:ajax event="tabChange"
							listener="#{shoppingCartController.onTabChange}"
							update=":centerForm:shoppingTabView" />
						<p:tab title="#{msgs.types}" id="type" titleStyle="color:red">
							<p:tabView style="font-weight:regular" dynamic="true"
								orientation="top">
								<p:tab title="#{msgs.freshFood}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isVegetableListEmpty}">
									<ui:include
										src="/components/public/product/vegetableShoppingProductList.xhtml" />
								</p:tab>

								<ui:remove>
									<p:tab title="#{msgs.PRODUCT_TYPE_FRUIT}"
										titleStyle="font-size:0.9em; font-weight:normal"
										rendered="#{!shoppingCartModel.requiredWeek.isFruitListEmpty}">
										<ui:include
											src="/components/public/product/fruitShoppingProductList.xhtml" />
									</p:tab>
								</ui:remove>
								<p:tab title="#{msgs.PRODUCT_TYPE_TOFU}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isToFuListEmpty}">
									<ui:include
										src="/components/public/product/toFuShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_SAUCE}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isSauceListEmpty}">
									<ui:include
										src="/components/public/product/sauceShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_SEASONING}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isSeasoningListEmpty}">
									<ui:include
										src="/components/public/product/seasoningShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_SPICY}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isSpicyListEmpty}">
									<ui:include
										src="/components/public/product/spicyShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_SNACK}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isSnackListEmpty}">
									<ui:include
										src="/components/public/product/snackShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_DRIED_FOOD}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isDriedFoodListEmpty}">
									<ui:include
										src="/components/public/product/driedFoodShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_MEAT}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isMeatListEmpty}">
									<ui:include
										src="/components/public/product/meatShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.PRODUCT_TYPE_OTHER}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isNotFreshListEmpty}">
									<ui:include
										src="/components/public/product/otherShoppingProductList.xhtml" />
								</p:tab>
								<p:tab title="#{msgs.fastSale}"
									titleStyle="font-size:0.9em; font-weight:normal"
									rendered="#{!shoppingCartModel.requiredWeek.isClearanceListEmpty and shoppingCartModel.isCanConfirm}">
									<ui:include
										src="/components/public/product/clearanceShoppingProductList.xhtml" />
								</p:tab>
							</p:tabView>
						</p:tab>
						<p:tab title="#{msgs.themes}" id="theme" titleStyle="color:red">
							<p:tabView id="themeView" var="theme"
								value="#{productThemeModel.activeProductThemes}"
								style="font-weight:regular;margin:0px;padding:0px"
								dynamic="true">

								<p:tab title="#{theme.nameLabel}"
									titleStyle="font-size:0.9em; font-weight:normal">
									<ui:include
										src="/components/public/product/theme/themeShoppingProductList.xhtml" />
								</p:tab>
							</p:tabView>
						</p:tab>
					</p:tabView>


				</h:form>
			</div>
			<div id="sideBarRight">
				<h:form id="rightForm">
					<ui:include src="/components/public/user/loginPanel.xhtml" />
					<ui:include
						src="/components/public/shopping/shoppingCartPanel.xhtml" />
				</h:form>
			</div>
		</ui:define>
	</ui:composition>
</body>

</html>